import {Component, Vue} from 'vue-property-decorator'
import {SettingsModule} from "@/core/store/modules/settings";

@Component({
    name: 'Setting'
})
export default class Setting extends Vue {

    get sidebar() {
        return SettingsModule.sidebar;
    }

    get contentWidth() {
        return SettingsModule.contentWidth;
    }

    get device() {
        return SettingsModule.device;
    }

    get autoHideHeader() {
        return SettingsModule.autoHideHeader;
    }

    get navTheme() {
        return SettingsModule.navTheme;
    }

    get multiTab() {
        return SettingsModule.multiTab;
    }

    get layout() {
        return SettingsModule.layout;
    }


    get fixSiderbar() {
        return SettingsModule.fixSiderbar;
    }

    get fixedHeader() {
        return SettingsModule.fixedHeader;
    }

    get contentPaddingLeft() {
        if (!this.fixSiderbar || this.isMobile()) {
            return '0'
        }
        if (this.sidebar) {
            return '256px'
        }
        return '80px'
    }

    get primaryColor() {
        return SettingsModule.primaryColor;
    }

    get language() {
        return SettingsModule.language;
    }

    isDesktop() {
        return this.device === "desktop"
    }

    isMobile() {
        return this.device === 'mobile'
    }

    isTopMenu() {
        return this.layout === 'topmenu'
    }

    isSideMenu() {
        return !this.isTopMenu()
    }
}
